package cn.wd.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.wd.model.Customer;
import cn.wd.service.CustomerService;
@Controller
@RequestMapping("/customer")
public class CustomerController {
	@Autowired
	CustomerService customerService;
	@RequestMapping("/ajaxLoad.do")
	@ResponseBody
	public Map<String,Object> ajaxLoad(String customerName){
		List<Customer> cList = customerService.ajaxLoad(customerName);
		Map<String,Object> resultMap = new HashMap<>();
		resultMap.put("success", true);
		resultMap.put("data", cList);
		return resultMap;
	}
}
